﻿Imports CMISObjectModel.PropertyDefinitions
Namespace DefaultData
   Public Class DefaultProperties
      Private _localNamespace As String
      Private _inherited As Boolean = False
      Public Sub New(localNamespace As String, Optional isBaseType As Boolean = True)
         _localNamespace = localNamespace
         If Not isBaseType Then
            _inherited = True
         End If
      End Sub

      Public ReadOnly Property PropertyName(Optional localName As String = "cmis:name", Optional queryName As String = "cmis:name", Optional orderable As Boolean = True, Optional updatability As Enums.Updatability = Enums.Updatability.ReadWrite) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:name", localName, _localNamespace, "Name of the object", "cmis:name", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, updatability)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyObjectId(Optional localName As String = "cmis:objectId", Optional queryName As String = "cmis:objectId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:objectId", localName, _localNamespace, "Id of the object", "cmis:objectId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)
            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyBaseTypeId(Optional localName As String = "cmis:baseTypeId", Optional queryName As String = "cmis:baseTypeId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:baseTypeId", localName, _localNamespace, "Id of the base object-type for the object", "cmis:baseTypeId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)
            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyObjectTypeId(Optional localName As String = "cmis:objectTypeId", Optional queryName As String = "cmis:objectTypeId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:objectTypeId", localName, _localNamespace, "Id of the object’'s type", "cmis:objectTypeId", True, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.OnCreate)
            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyCreatedBy(Optional localName As String = "cmis:createdBy", Optional queryName As String = "cmis:createdBy", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:createdBy", localName, _localNamespace, "User who created the object.", "cmis:createdBy", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)
            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyCreationDate(Optional localName As String = "cmis:creationDate", Optional queryName As String = "cmis:creationDate", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyDateTimeDefinition("cmis:creationDate", localName, _localNamespace, "DateTime when the object was created.", "cmis:creationDate", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyLastModifiedBy(Optional localName As String = "cmis:lastModifiedBy", Optional queryName As String = "cmis:lastModifiedBy", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:lastModifiedBy", localName, _localNamespace, "User who last modified the object.", "cmis:lastModifiedBy", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property


      Public ReadOnly Property PropertyLastModificationDate(Optional localName As String = "cmis:lastModificationDate", Optional queryName As String = "cmis:lastModificationDate", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyDateTimeDefinition("cmis:lastModificationDate", localName, _localNamespace, "DateTime when the object was last modified.", "cmis:lastModificationDate", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyChangeToken(Optional localName As String = "cmis:changeToken", Optional queryName As String = "cmis:changeToken", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:changeToken", localName, _localNamespace, "Opaque token used for optimistic locking & concurrency checking", "cmis:changeToken", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyIsImmutable(Optional localName As String = "cmis:isImmutable", Optional queryName As String = "cmis:isImmutable", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyBooleanDefinition("cmis:isImmutable", localName, _localNamespace, "TRUE if the repository MUST throw an error at any attempt to update or delete the object.", "cmis:isImmutable", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyIsLatestVersion(Optional localName As String = "cmis:isLatestVersion", Optional queryName As String = "cmis:isLatestVersion", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyBooleanDefinition("cmis:isLatestVersion", localName, _localNamespace, "isLatestVersion", "cmis:isLatestVersion", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyIsMajorVersion(Optional localName As String = "cmis:isMajorVersion", Optional queryName As String = "cmis:isMajorVersion", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyBooleanDefinition("cmis:isMajorVersion", localName, _localNamespace, "isMajorVersion", "cmis:isMajorVersion", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyIsLatestMajorVersion(Optional localName As String = "cmis:isLatestMajorVersion", Optional queryName As String = "cmis:isLatestMajorVersion", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyBooleanDefinition("cmis:isLatestMajorVersion", localName, _localNamespace, "isLatestMajorVersion", "cmis:isLatestMajorVersion", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyVersionLabel(Optional localName As String = "cmis:versionLabel", Optional queryName As String = "cmis:versionLabel", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:versionLabel", localName, _localNamespace, "versionLabel", "cmis:versionLabel", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyVersionSeriesId(Optional localName As String = "cmis:versionSeriesId", Optional queryName As String = "cmis:versionSeriesId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:versionSeriesId", localName, _localNamespace, "versionSeriesId", "cmis:versionSeriesId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyIsVersionSeriesCheckedOut(Optional localName As String = "cmis:isVersionSeriesCheckedOut", Optional queryName As String = "cmis:isVersionSeriesCheckedOut", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyBooleanDefinition("cmis:isVersionSeriesCheckedOut", localName, _localNamespace, "isVersionSeriesCheckedOut", "cmis:isVersionSeriesCheckedOut", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyVersionSeriesCheckedOutBy(Optional localName As String = "cmis:versionSeriesCheckedOutBy", Optional queryName As String = "cmis:versionSeriesCheckedOutBy", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:versionSeriesCheckedOutBy", localName, _localNamespace, "versionSeriesCheckedOutBy", "cmis:versionSeriesCheckedOutBy", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyVersionSeriesCheckedOutId(Optional localName As String = "cmis:versionSeriesCheckedOutId", Optional queryName As String = "cmis:versionSeriesCheckedOutId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:versionSeriesCheckedOutId", localName, _localNamespace, "versionSeriesCheckedOutId", "cmis:versionSeriesCheckedOutId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyCheckinComment(Optional localName As String = "cmis:checkinComment", Optional queryName As String = "cmis:checkinComment", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:checkinComment", localName, _localNamespace, "checkinComment", "cmis:checkinComment", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyContentStreamLength(Optional localName As String = "cmis:contentStreamLength", Optional queryName As String = "cmis:contentStreamLength", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIntegerDefinition("cmis:contentStreamLength", localName, _localNamespace, "Length of the content stream (in bytes).", "cmis:contentStreamLength", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly) With {
               .MinValue = Integer.MinValue,
               .MaxValue = Integer.MaxValue
            }

            retval.description = retval.displayName
            Return retval
         End Get
      End Property

      Public ReadOnly Property PropertyContentStreamMimeType(Optional localName As String = "cmis:contentStreamMimeType", Optional queryName As String = "cmis:contentStreamMimeType", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:contentStreamMimeType", localName, _localNamespace, "MIME type of the Content Stream", "cmis:contentStreamMimeType", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyContentStreamFileName(Optional localName As String = "cmis:contentStreamFileName", Optional queryName As String = "cmis:contentStreamFileName", Optional orderable As Boolean = True, Optional updatability As Enums.Updatability = Enums.Updatability.Readonly) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:contentStreamFileName", localName, _localNamespace, "File name of the Content Stream", "cmis:contentStreamFileName", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, updatability)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyContentStreamId(Optional localName As String = "cmis:contentStreamId", Optional queryName As String = "cmis:contentStreamId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:contentStreamId", localName, _localNamespace, "Id of the stream", "cmis:contentStreamId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyParentId(Optional localName As String = "cmis:parentId", Optional queryName As String = "cmis:parentId", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:parentId", localName, _localNamespace, "ID of the parent folder of the folder.", "cmis:parentId", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyPath(Optional localName As String = "cmis:path", Optional queryName As String = "cmis:path", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:path", localName, _localNamespace, "The fully qualified path to this folder.", "cmis:path", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyAllowedChildObjectTypeIds(Optional localName As String = "cmis:allowedChildObjectTypeIds", Optional queryName As String = "cmis:allowedChildObjectTypeIds", Optional orderable As Boolean = True) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:allowedChildObjectTypeIds", localName, _localNamespace, "Id’'s of the set of Object-types that can be created, moved or filed into this folder.", "cmis:allowedChildObjectTypeIds", False, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Multi, Enums.Updatability.Readonly)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertySourceId(Optional localName As String = "cmis:sourceId", Optional queryName As String = "cmis:sourceId", Optional orderable As Boolean = True, Optional updatability As Enums.Updatability = Enums.Updatability.ReadWrite) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:sourceId", localName, _localNamespace, "ID of the source object of the relationship.", "cmis:sourceId", True, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, updatability)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyTargetId(Optional localName As String = "cmis:targetId", Optional queryName As String = "cmis:targetId", Optional orderable As Boolean = True, Optional updatability As Enums.Updatability = Enums.Updatability.ReadWrite) As IPropertyDefinition
         Get
            Dim retVal As New PropertyIdDefinition("cmis:targetId", localName, _localNamespace, "ID of the target object of the relationship.", "cmis:targetId", True, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, updatability)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property

      Public ReadOnly Property PropertyPolicyText(Optional localName As String = "cmis:policyText", Optional queryName As String = "cmis:policyText", Optional orderable As Boolean = True, Optional updatability As Enums.Updatability = Enums.Updatability.Readonly) As IPropertyDefinition
         Get
            Dim retVal As New PropertyStringDefinition("cmis:policyText", localName, _localNamespace, "User-friendly description of the policy", "cmis:policyText", True, _inherited, Not String.IsNullOrEmpty(queryName), orderable, Enums.Cardinality.Single, updatability)

            retVal.Description = retVal.DisplayName
            Return retVal
         End Get
      End Property
   End Class
End Namespace